<html>
<head><meta charset="utf-8"><title>Use in function · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Use.20in.20function.html">Use in function</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="212196311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Use%20in%20function/near/212196311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Use.20in.20function.html#212196311">(Oct 04 2020 at 00:02)</a>:</h4>
<p>Wasn't sure if this is known or not, but are <code>use</code>s in functions supposed to work?<br>
Like <a href="https://github.com/rust-lang/rust/blob/25c8c53dd994acb3f4f7c02fe6bb46076393f8b0/compiler/rustc_traits/src/chalk/lowering.rs#L397">here</a>, I've done <code>use chalk_ir::TyData</code> at the top of the function, but later on, I get <code>{unknown}</code> around <code>TyData::Alias</code> and such</p>



<a name="212200028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Use%20in%20function/near/212200028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Use.20in.20function.html#212200028">(Oct 04 2020 at 01:43)</a>:</h4>
<p>If I recall correctly imports in inner scopes that aren't modules don't work currently</p>



<a name="212210628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Use%20in%20function/near/212210628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Use.20in.20function.html#212210628">(Oct 04 2020 at 07:25)</a>:</h4>
<p>They don't: <a href="https://github.com/rust-analyzer/rust-analyzer/issues/1165">https://github.com/rust-analyzer/rust-analyzer/issues/1165</a></p>



<a name="212229986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Use%20in%20function/near/212229986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Use.20in.20function.html#212229986">(Oct 04 2020 at 16:27)</a>:</h4>
<p>Oof. Missed that when I was looking for an issue</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>